package com.reform.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.reform.pojo.expert.Expert;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author mortale
 * @since 2021-06-26
 */
@Mapper
public interface ExpertMapper extends BaseMapper<Expert> {

    @Select(
            "SELECT\n" +
                    "	expert.batch_id\n" +
                    "FROM\n" +
                    "	expert\n" +
                    "	WHERE gh = #{gh} AND type = #{type}\n" +
                    "	GROUP BY batch_id"
    )
    List<String> getBatchIdByGH(@Param("gh") String gh, @Param("type") int type);
}
